Quadratic Equation Solver

A recently posted video demonstrates a "new" way to solve quadratic equations. It was used by ancient civilizations including the Greeks and Indians. The proof is recounted here and the algorithm is implemented below.

  1. If you find r and s with sum -B and product C, then x2 + Bx + C = (x - r)(x - s), and they are all the roots
  2. Two numbers sum to -B when they are -B/2 ± u
  3. Their product is C when B2/4 - u2 = C
  4. Square root always gives a valid u
  5. Thus -B/2 ± u work as r and s, and are all the roots



Enter a B and C and hit the button: